<extend name="Public:innerbase" />
<block name="js">
<include file="Public:upload" />
</block>
<block name="content">
<div class="container-fluid">
	<div class="page-header wm-page-header">
		<h4>在线预订管理</h4>
		<a href="{:U('Host/index')}" class="btn btn-default btn-sm">
			<span class="glyphicon glyphicon-chevron-left"></span>&nbsp;返回
		</a>
	</div>
	<div class="alert alert-info">
        本次收集订单总数：<span class="text-danger">{$count}</span>个　　预订成功：<span class="text-danger">{$ok_count}</span>个　　预订失败：<span class="text-danger">{$lost_count}</span>个　　未处理订单：<span class="text-danger">{$no_count}</span>个
    </div>
	<table class="table wm-table-bordered">
		<thead>
			<tr>
				<th>预订人</th>
				<th width="120">电话</th>
				<th width="120">入住时间</th>
				<th width="120">离店时间</th>
				<th>房间类型</th>
				<th width="160">预订时间</th>
				<th width="80">预订数量</th>
				<th width="60">价格</th>
				<th width="80">订单状态</th>
				<th width="150">操作</th>
			</tr>
		</thead>
        <tbody>
			<volist name="li" id="list"> 
			<tr>
			<td>{$list.name}</td>
			<td>{$list.tel}</td>
			<td>{$list.checkin_date|date="Y-m-d",###}</td>
			<td>{$list.checkout_date|date="Y-m-d",###}</td>
			<td>{$list.house_name}</td>
			<td>{$list.time|date="Y-m-d H:i:s",###}</td>
			<td>{$list.nums}</td>
			<td>{$list.price}</td>
			<td>
			<if condition="$list.status eq 1"> <span class="text-warning">等待支付</span> 
			<elseif condition="$list.status eq 2"/> <span class="text-success">已完成 </span>
			<else />
			<span class="text-danger">已取消</span>
			</if>
			</td>
			<td colspan="10" class="norightborder">  
			<if condition="$list.status eq 1">
			<a href="{:U('pay?id='.$list['id'])}" class="btn btn-xs btn-primary">支付</a>
			<a href="{:U('cancel?id='.$list['id'])}" class="btn btn-xs btn-primary">取消</a>
			<else />
			</if>
			</td>
			</tr>
			</volist> 
		</tbody>
	</table>
	<div class="pages">{$page}</div>
</div>
</block>